<template>
  <li class="item">
    <el-checkbox
    v-model="item.ok"
    ></el-checkbox>
    <input class="item__input" :style="{ color: item.ok ? '#c0c4cc' : null }"
      v-model.trim="item.content"
    />
    <el-button class="item__delete" type="danger" icon="el-icon-delete" circle
      @click="$emit('delete-item', index)"
    ></el-button>
  </li>
</template>

<script>
export default {
  name: 'Item',
  props: ['item', 'index'],
  data () {
    return {
    }
  }
}
</script>

<style>
  .item {
    font-size: 14px;
    line-height: 40px;
    height: 40px;
    display: flex;
    align-items: center;
  }
  .item__input {
    flex-grow: 1;
    height: 14px;
    padding-left: 14px;
  }
  .el-button.item__delete {
    width: 20px;
    height: 20px;
    padding: 0;
    border: 0;
  }
</style>
